package com.example.service.impl;

import com.example.dao.CollectionDao;
import com.example.dao.impl.CollectionDaoImpl;
import com.example.model.Collection;
import com.example.service.CollectionService;
import com.example.vo.Page;
import java.util.Map;

public class CollectionServiceImpl implements CollectionService {
    @Override
    public Page<Collection> getPage(Map<String, String> params) {
        CollectionDao collectionDao = new CollectionDaoImpl();
        Page<Collection> page = new Page<>();
        page.setRecords(collectionDao.getUsersByCondition(params));
        page.setCount(collectionDao.getTotal(params));
        page.setPageSize(3);
        return page;
    }
}
